<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html.body{
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }
        .container{
            margin: 0 auto;
            width: 1000px;
        }
        .header{
            height: 100px;
            width: 100%;
            background-color: antiquewhite;
            /* 相对定位 */
            position: relative;
        }
        .logo{
            height: 100px;
            width: 300px;
            background-color: blue;
            position: absolute;
            left: 0;
        }
        .search{
            height: 100px;
            width: 300px;
            background-color: green;
            position: absolute;
            right: 0;
            line-height: 100px;
            /* 方式1 */
            /* padding-left: 50px;
            box-sizing: border-box; */
        }
        /* 方式2 */
        /* .search>input{
            margin-left: 50px;
        } */
         /* 方式3 */
        .search input{
            margin-left: 50px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="logo"></div>
            <div class="search">
                <input type="text">
            </div>
        </div>
    </div>
</body>
</html>